<!--{include(file='head.html')}-->
<script src="template/jslib/xheditor/xheditor.js" type="text/javascript"></script>
<script type="text/javascript" src="template/jslib/upload/ajaxupload.js"></script>

<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<form action="<!--{url('admin','basicset','index')}-->" method="post" name="submitform" id="submitform">
		<div id="main_c">
			<div id="infotab">
				<ul>
					<li class="cur"><a href="javascript:void(0);" id="a_base" onclick="$.oper.jstab('a_base');return false;">基本信息</a></li>
					<li><a href="javascript:void(0);" id="a_foot"	onclick="$.oper.jstab('a_foot');return false;">页面</a></li>
					<li><a href="javascript:void(0);" id="a_seo"	onclick="$.oper.jstab('a_seo');return false;">SEO</a></li>
					<li><a href="javascript:void(0);" id="a_gzip"	onclick="$.oper.jstab('a_gzip');return false;">压缩网页</a></li>
				</ul>
			</div>
			<ul class="bk" id="forbase">
				<li>
					<label><em>*</em>商城名称：</label>
					<p>
						<input class="input_tx" value="<!--{def($basicset.mallname)}-->" name="mallname" id="mallname" type="text"/>
					</p>
				</li>
				<li>
					<label>商家Email：</label>
					<p>
						<input class="input_tx" value="<!--{def($basicset.bossemail)}-->" name="bossemail" type="text"/>
					</p>
				</li>

				<li>
					<label>商家手机：</label>
					<p>
						<input class="input_tx" value="<!--{def($basicset.bossmobile)}-->" name="bossmobile" type="text"/>
					</p>
				</li>
				<li>
					<label>商城logo：</label>
					<p>
						<div id="buttonholder"></div>
					</p>
					<input type="hidden" value="<!--{def($basicset.malllogo)}-->" name="pic" id="pic"/>
				</li>
				<li style="clear:both;">
					<label></label>
					<p id="uploadpic">
						<!--{if $basicset.malllogo}-->
								<img src="<!--{$basicset.malllogo}-->" />
						<!--{/if}-->
					</p>
				</li>
			</ul>
			<ul class="bk none" id="forfoot">
				<li>
					<label>模版：</label>
					<p>
						<select name="tpl">
							<!--{$tplopt}-->
						</select>
					</p>
				</li>
				<li>
					<label>页面底部信息：</label>
					<p>
						<textarea name="pagefoot" id="pagefoot"><!--{def($basicset.pagefoot)}--></textarea>
					</p>
				</li>
			</ul>
			<ul class="bk none" id="forseo">
				<li>
					<label>URL重写：</label>
					<p>
						<input value="1" name="rewrite" type="checkbox" <!--{if $basicset.rewrite}-->checked<!--{/if}-->/>
						（友好化url，形如index.php?model=item&action=index&itemid=1可显示为item-1.html，须web服务器apache等支持）
					</p>
				</li>
				<li style="margin-bottom:20px;">
					<label>Sitemap：</label>
					<p>
						<a onclick="jsmap();return false;" class="bt_style2" href="javascript:void(0);">更新</a>
						<a href="sitemap.xml" target="_blank">查看站点地图</a>
						<span class="state_tip" style="float:none;"></span>
					</p>
				</li>
				<li>
					<label>商城标题：</label>
					<p>
						<input class="input_tx" value="<!--{def($basicset.malltitle)}-->" name="malltitle" type="text" />
					</p>
				</li>
				<li>
					<label>商城关键词：</label>
					<p>
						<input class="input_tx" value="<!--{def($basicset.mallkeywords)}-->" name="mallkeywords" type="text" />
					</p>
				</li>

				<li>
					<label>商城描述：</label>
					<p>
						<textarea name="malldesc" id="malldesc" class="text_tx"><!--{def($basicset.malldesc)}--></textarea>
					</p>
				</li>
			</ul>
			<ul class="bk none" id="forgzip">
				<li>
					<label>压缩网页：</label>
					<p>
						<input value="1" name="gzip" type="checkbox" <!--{if $basicset.gzip}-->checked<!--{/if}-->/>
						（压缩发送网页大小，加快网页传输，启用后，如果页面出错，可能您的web服务器已经启用了压缩，请取消此项设置）
					</p>
				</li>
			</ul>
			<div class="bt_bk2">
				<a href="javascript:void(0);" class="btn" onclick="jssubmit('basic');return false;"><span>保存</span></a>
			</div>
		</div>
		</form>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	$("#pagefoot").xheditor({upImgUrl:"<!--{url('admin','uploadfile','pic')}-->"});
	var uploader = new qq.FileUploader({action:"<!--{url('admin','uploadfile','pic')}-->"});
});
function jsmap() {
	var url = "<!--{url('admin','basicset','updSitemap')}-->";
	$.util.show();
	$.post(url,{},function(data){
		$.util.hide();
		if(data == "success") {
			jAlert("Sitemap.xml生成成功！");
		} else {
			jAlert("发生错误,请刷新页面后重新执行该操作");
		}
	})
}
</script>